package net.anzhuo.common.base;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonIgnore;

public class BaseEntity implements Serializable {

	protected static final long serialVersionUID = 1L;

	@JsonIgnore
    protected Integer pageNo = 1;
	@JsonIgnore
    protected Integer startRow = 0;
	@JsonIgnore
    protected Integer pageSize = 3;
    
    public void setPageNo(Integer pageNo) {
    	if (pageNo==null || pageNo<1) {
    		pageNo = 1;
    	}
        this.pageNo=pageNo;
        this.startRow = (pageNo-1)*this.pageSize;
    }
    public Integer getPageNo() {
        return pageNo;
    }
    public Integer getStartRow() {
        return startRow;
    }
    public void setPageSize(Integer pageSize) {
        this.pageSize=pageSize;
        this.startRow = (pageNo-1)*this.pageSize;
    }
    public Integer getPageSize() {
        return pageSize;
    }
}
